﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Styx;
using Styx.Combat.CombatRoutine;
using Styx.Helpers;
using Styx.Logic;
using Styx.Logic.Combat;
using Styx.Logic.Pathing;
using Styx.WoWInternals;
using Styx.WoWInternals.WoWObjects;
using HBPVPDruid.Misc;


/*
 * this is going to take some thinking due to fact we want to 
 * moonfire every person in range, then smash 1 person spamming this.
 * so hm
 */

namespace HBPVPDruid.Spells
{
    public static class Moonfire
    {
        public const string SpellName = "Moonfire";
        public static readonly int SpellDistance = 40;

        public static bool Pulse(WoWUnit Player, bool ReBuff)
        {
            // Quick Checks to return false
            if (Player.Distance > 40) return false;
            if (!SpellManager.CanCast(SpellName)) return false;
            if (ReBuff == true) { if (Player.HasAura(SpellName)) return false; }
            if (!ObjectManager.Me.HasAura("Eclipse (Solar)") && ObjectManager.Me.HasAura(SpellName)) return false;

            Misc.Misc.CastLog(SpellName, Player.Name);
            SpellManager.Cast(SpellName, Player);
            return true;
        }
    }
}
